#!/bin/bash
DB=$1
DBPATH=$2
WAREHOUSE="user/hive/warehouse/$DBPATH.db"

hive<<EOF
use $DB;
drop table tac_hour_http;
CREATE EXTERNAL TABLE tac_hour_http(
time                        string,
tac                         string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/tac_hour_http';

drop table tac_day_http;
CREATE EXTERNAL TABLE tac_day_http(
time                        string,
tac                         string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/tac_day_http';

drop table cell_hour_http;
CREATE EXTERNAL TABLE cell_hour_http(
time                        string,
cellid                      bigint,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/cell_hour_http';

drop table cell_day_http;
CREATE EXTERNAL TABLE cell_day_http(
time                        string,
cellid                      bigint,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/cell_day_http';


drop table sp_hour_http;
CREATE EXTERNAL TABLE sp_hour_http(
time                        string,
appserveripipv4             string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/sp_hour_http';

drop table sp_day_http;
CREATE EXTERNAL TABLE sp_day_http(
time                        string,
appserveripipv4             string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/sp_day_http';


drop table ue_hour_http;
CREATE EXTERNAL TABLE ue_hour_http(
time                        string,
imsi                        string,
msisdn                      string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/ue_hour_http';


drop table ue_day_http;
CREATE EXTERNAL TABLE ue_day_http(
time                        string,
imsi                        string,
msisdn                      string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/ue_day_http';

drop table imsi_cell_hour_http;
CREATE EXTERNAL TABLE imsi_cell_hour_http(
time                        string,
imsi                        string,
msisdn                      string,
cellid                      bigint,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/imsi_cell_hour_http';

drop table imsi_cell_day_http;
CREATE EXTERNAL TABLE imsi_cell_day_http(
time                        string,
imsi                        string,
msisdn                      string,
cellid                      bigint,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/imsi_cell_day_http';

drop table sgw_hour_http;
CREATE EXTERNAL TABLE sgw_hour_http(
time                        string,
sgwipaddr                   string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/sgw_hour_http';

drop table sgw_day_http;
CREATE EXTERNAL TABLE sgw_day_http(
time                        string,
sgwipaddr                   string,
browsedownloadvisits        int,
videoservicevisits          int,
instantmessagevisits        int,
appvisits                   int,
browsedownloadbusiness      int,
videoservicebusiness        int,
instantmessagebusiness      int,
appbusiness                 int,
dnsQuerySucc                int,
dnsQueryAtt                 int,
tcpSetupSucc                int,
tcpSetupReq                 int,
BearerULTCPRetransmit       int,
BearerULTCPTransmit         int,
BearerDLTCPRetransmit       int,
BearerDLTCPTransmit         int,
BearerULTCPMissequence      int,
BearerDLTCPMissequence      int,
pageresp                    int,
pagereq                     int,
pageresptimeall             int,
pageshowsucc                int,
pageshowtimeall             int,
httpdownflow                int,
httpdowntime                int,
mediasucc                   int,
mediareq                    int,
mediadownflow               double,
mediadowntime               int,
ServiceIMSucc               int,
ServiceIMReq                int,
readvisits                  int,
wbvisits                    int,
navigationvisits            int,
musicvisits                 int,
gamevisits                  int,
payvisits                   int,
Animevisits                 int,
mailvisits                  int,
p2pvisits                   int,
voipvisits                  int,
MultimediaMsgvisits         int,
financialvisits            int,
securityvisits              int,
shoppingvisits              int,
travelvisits                int,
cloudstoragevisits          int,
othervisits                 int,
readbusiness                int,
wbbusiness                  int,
navigationbusiness          int,
musicbusiness               int,
gamebusiness                int,
paybusiness                 int,
Animebusiness               int,
mailbusiness                int,
p2pbusiness                 int,
voipbusiness                int,
MultimediaMsgbusiness       int,
financialbusiness           int,
securitybusiness            int,
shoppingbusiness            int,
travelbusiness              int,
cloudstoragebusiness        int,
otherbusiness               int,
mediaRespTimeall            int,
mediaResp                   int,
ServiceIMTrans              int,
ServiceIMFlow               double,
ServiceIMTime               int,
readsucc                    int,
readreq                     int,
readresptimeall             int,
readresp                    int,
readdownflow                int,
readdowntime                int,
wbsucc                      int,
wbreq                       int,
wbresptimeall               int,
wbresp                      int,
wbdownflow                  int,
wbdowntime                  int,
navigationsucc              int,
navigationreq               int,
navigationresptimeall       int,
navigationresp              int,
navigationdownflow          int,
navigationdowntime          int,
musicsucc                   int,
musicreq                    int,
musicresptimeall            int,
musicresp                   int,
musicdownflow               int,
musicdowntime               int,
appsucc                     int,
appreq                      int,
appresptimeall              int,
appresp                     int,
appdownflow                 int,
appdowntime                 int,
gamesucc                    int,
gamereq                     int,
gameresptimeall             int,
gameresp                    int,
gamedownflow                int,
gamedowntime                int,
paysucc                     int,
payreq                      int,
payresptimeall              int,
payresp                     int,
paydownflow                 int,
paydowntime                 int,
Animesucc                   int,
Animereq                    int,
Animeresptimeall            int,
Animeresp                   int,
Animedownflow               int,
Animedowntime               int,
mailsucc                    int,
mailreq                     int,
mailresptimeall             int,
mailresp                    int,
maildownflow                int,
maildowntime                int,
P2Psucc                     int,
P2Preq                      int,
P2Presptimeall              int,
P2Presp                     int,
P2Pdownflow                 int,
P2Pdowntime                 int,
VoIPsucc                    int,
VoIPreq                     int,
VoIPresptimeall             int,
VoIPresp                    int,
VoIPdownflow                int,
VoIPdowntime                int,
MultimediaMsgsucc           int,
MultimediaMsgreq            int,
MultimediaMsgresptimeall    int,
MultimediaMsgresp           int,
MultimediaMsgdownflow       int,
MultimediaMsgdowntime       int,
financialsucc               int,
financialreq                int,
financialresptimeall        int,
financialresp               int,
financialdownflow           int,
financialdowntime           int,
securitysucc                int,
securityreq                 int,
securityresptimeall         int,
securityresp                int,
securitydownflow            int,
securitydowntime            int,
shoppingsucc                int,
shoppingreq                 int,
shoppingresptimeall         int,
shoppingresp                int,
shoppingdownflow            int,
shoppingdowntime            int,
travelsucc                  int,
travelreq                   int,
travelresptimeall           int,
travelresp                  int,
traveldownflow              int,
traveldowntime              int,
cloudstoragesucc            int,
cloudstoragereq             int,
cloudstorageresptimeall     int,
cloudstorageresp            int,
cloudstoragedownflow        int,
cloudstoragedowntime        int,
internetsucc                int,
internetreq                 int,
internetresptimeall         int,
internetresp                int,
internetdownflow            int,
internetdowntime            int,
migusucc                    int,
migureq                     int,
miguresptimeall             int,
miguresp                    int,
migudownflow                int,
migudowntime                int,
othersucc                   int,
otherreq                    int,
otherresptimeall            int,
otherresp                   int,
otherdownflow               int,
otherdowntime               int,
instantmessageTime          int,
readTime                    int,
wbTime                      int,
navigationTime              int,
videoserviceTime            int,
musicTime                   int,
appTime                     int,
gameTime                    int,
payTime                     int,
AnimeTime                   int,
mailTime                    int,
p2pTime                     int,
voipTime                    int,
MultimediaMsgTime           int,
browsedownloadTime          int,
financialTime               int,
securityTime                int,
shoppingTime                int,
travelTime                  int,
cloudstorageTime            int,
internetTime                int,
miguTime                    int,
otherTime                   int,
browsesurfresp                      int,
browsesurfreq                       int,
browsesurfresptimeall               int,
browsesurfshowsucc                  int,
browsesurfshowtimeall               int,
browsesurfdownflow                  int,
browsesurfdowntime                  int,
browsesurfFlow                      int,
browsesurfTime                      int,
browsetencentresp                   int,
browsetencentreq                    int,
browsetencentresptimeall            int,
browsetencentshowsucc               int,
browsetencentshowtimeall            int,
browsetencentdownflow               int,
browsetencentdowntime               int,
browsetencentFlow                   int,
browsetencentTime                   int,
browseqqNewsresp                    int,
browseqqNewsreq                     int,
browseqqNewsresptimeall             int,
browseqqNewsshowsucc                int,
browseqqNewsshowtimeall             int,
browseqqNewsdownflow                int,
browseqqNewsdowntime                int,
browseqqNewsFlow                    int,
browseqqNewsTime                    int,
browsetoutiaoresp                   int,
browsetoutiaoreq                    int,
browsetoutiaoresptimeall            int,
browsetoutiaoshowsucc               int,
browsetoutiaoshowtimeall            int,
browsetoutiaodownflow               int,
browsetoutiaodowntime               int,
browsetoutiaoFlow                   int,
browsetoutiaoTime                   int,
browseChromeresp                    int,
browseChromereq                     int,
browseChromeresptimeall             int,
browseChromeshowsucc                int,
browseChromeshowtimeall             int,
browseChromedownflow                int,
browseChromedowntime                int,
browseChromeFlow                    int,
browseChromeTime                    int,
otherhttpresp                       int,
otherhttpreq                        int,
otherhttpresptimeall                int,
otherhttpshowsucc                   int,
otherhttpshowtimeall                int,
otherhttpdownflow                   int,
otherhttpdowntime                   int,
otherhttpFlow                       int,
otherhttpTime                       int,
videomobileTVsucc                   int,
videomobileTVreq                    int,
videomobileTVresptimeall            int,
videomobileTVresp                   int,
videomobileTVdownflow               int,
videomobileTVdowntime               int,
videomobileTVFlow                   int,
videomobileTVTime                   int,
videomiguvideosucc                  int,
videomiguvideoreq                   int,
videomiguvideoresptimeall           int,
videomiguvideoresp                  int,
videomiguvideodownflow              int,
videomiguvideodowntime              int,
videomiguvideoFlow                  int,
videomiguvideoTime                  int,
videoiqiyisucc                      int,
videoiqiyireq                       int,
videoiqiyiresptimeall               int,
videoiqiyiresp                      int,
videoiqiyidownflow                  int,
videoiqiyidowntime                  int,
videoiqiyiFlow                      int,
videoiqiyiTime                      int,
imFechatsucc                        int,
imFechatreq                         int,
imFechatresptimeall                 int,
imFechatresp                        int,
imFechatdownflow                    int,
imFechatdowntime                    int,
imFechatFlow                        int,
imFechatTime                        int,
imFetionsucc                        int,
imFetionreq                         int,
imFetionresptimeall                 int,
imFetionresp                        int,
imFetiondownflow                    int,
imFetiondowntime                    int,
imFetionFlow                        int,
imFetionTime                        int,
imQQsucc                            int,
imQQreq                             int,
imQQresptimeall                     int,
imQQresp                            int,
imQQdownflow                        int,
imQQdowntime                        int,
imQQFlow                            int,
imQQTime                            int,
imwechatsucc                        int,
imwechatreq                         int,
imwechatresptimeall                 int,
imwechatresp                        int,
imwechatdownflow                    int,
imwechatdowntime                    int,
imwechatFlow                        int,
imwechatTime                        int,
readcmreadsucc                      int,
readcmreadreq                       int,
readcmreadresptimeall               int,
readcmreadresp                      int,
readcmreaddownflow                  int,
readcmreaddowntime                  int,
readcmreadFlow                      int,
readcmreadTime                      int,
readsurfsucc                        int,
readsurfreq                         int,
readsurfresptimeall                 int,
readsurfresp                        int,
readsurfdownflow                    int,
readsurfdowntime                    int,
readsurtFlow                        int,
readsurfTime                        int,
readQQReadsucc                      int,
readQQReadreq                       int,
readQQReadresptimeall               int,
readQQReadresp                      int,
readQQReaddownflow                  int,
readQQReaddowntime                  int,
readQQReadFlow                      int,
readQQReadTime                      int,
weibo139wbsucc                      int,
weibo139wbreq                       int,
weibo139wbresptimeall               int,
weibo139wbresp                      int,
weibo139wbdownflow                  int,
weibo139wbdowntime                  int,
weibo139wbFlow                      int,
weibo139wbTime                      int,
weibosinaWeibosucc                  int,
weibosinaWeiboreq                   int,
weibosinaWeiboresptimeall           int,
weibosinaWeiboresp                  int,
weibosinaWeibodownflow              int,
weibosinaWeibodowntime              int,
weibosinaWeiboFlow                  int,
weibosinaWeiboTime                  int,
navigationheMapsucc                 int,
navigationheMapreq                  int,
navigationheMapresptimeall          int,
navigationheMapresp                 int,
navigationheMapdownflow             int,
navigationheMapdowntime             int,
navigationheMapFlow                 int,
navigationheMapTime                 int,
navigationaMapsucc                  int,
navigationaMapreq                   int,
navigationaMapresptimeall           int,
navigationaMapresp                  int,
navigationaMapdownflow              int,
navigationaMapdowntime              int,
navigationaMapFlow                  int,
navigationaMapTime                  int,
musicmigumusicsucc                  int,
musicmigumusicreq                   int,
musicmigumusicresptimeall           int,
musicmigumusicresp                  int,
musicmigumusicdownflow              int,
musicmigumusicdowntime              int,
musicmigumusicFlow                  int,
musicmigumusicTime                  int,
musicqqmusicsucc                    int,
musicqqmusicreq                     int,
musicqqmusicresptimeall             int,
musicqqmusicresp                    int,
musicqqmusicdownflow                int,
musicqqmusicdowntime                int,
musicqqmusicFlow                    int,
musicqqmusicTime                    int,
AppStoreMobileMarketsucc            int,
AppStoreMobileMarketreq             int,
AppStoreMobileMarketresptimeall     int,
AppStoreMobileMarketresp            int,
AppStoreMobileMarketdownflow        int,
AppStoreMobileMarketdowntime        int,
AppStoreMobileMarketFlow            int,
AppStoreMobileMarketTime            int,
AppStoreAppStoresucc                int,
AppStoreAppStorereq                 int,
AppStoreAppStoreresptimeall         int,
AppStoreAppStoreresp                int,
AppStoreAppStoredownflow            int,
AppStoreAppStoredowntime            int,
AppStoreAppStoreFlow                int,
AppStoreAppStoreTime                int,
GamemiguGamesucc                    int,
GamemiguGamereq                     int,
GamemiguGameresptimeall             int,
GamemiguGameresp                    int,
GamemiguGamedownflow                int,
GamemiguGamedowntime                int,
GamemiguGameFlow                    int,
GamemiguGameTime                    int,
Game4399Gamesucc                    int,
Game4399Gamereq                     int,
Game4399Gameresptimeall             int,
Game4399Gameresp                    int,
Game4399Gamedownflow                int,
Game4399Gamedowntime                int,
Game4399GameFlow                    int,
Game4399GameTime                    int,
PayNFCSIMsucc                       int,
PayNFCSIMreq                        int,
PayNFCSIMresptimeall                int,
PayNFCSIMresp                       int,
PayNFCSIMdownflow                   int,
PayNFCSIMdowntime                   int,
PayNFCSIMFlow                       int,
PayNFCSIMTime                       int,
PaymobilePaysucc                    int,
PaymobilePayreq                     int,
PaymobilePayresptimeall             int,
PaymobilePayresp                    int,
PaymobilePaydownflow                int,
PaymobilePaydowntime                int,
PaymobilePayFlow                    int,
PaymobilePayTime                    int,
PayNFCsucc                          int,
PayNFCreq                           int,
PayNFCresptimeall                   int,
PayNFCresp                          int,
PayNFCdownflow                      int,
PayNFCdowntime                      int,
PayNFCFlow                          int,
PayNFCTime                          int,
Animemigudmsucc                     int,
Animemigudmreq                      int,
Animemigudmresptimeall              int,
Animemigudmresp                     int,
Animemigudmdownflow                 int,
Animemigudmdowntime                 int,
AnimemigudmFlow                     int,
AnimemigudmTime                     int,
AnimeqqComicsucc                    int,
AnimeqqComicreq                     int,
AnimeqqComicresptimeall             int,
AnimeqqComicresp                    int,
AnimeqqComicdownflow                int,
AnimeqqComicdowntime                int,
AnimeqqComicFlow                    int,
AnimeqqComicTime                    int,
mail139mailsucc                     int,
mail139mailreq                      int,
mail139mailresptimeall              int,
mail139mailresp                     int,
mail139maildownflow                 int,
mail139maildowntime                 int,
mail139mailFlow                     int,
mail139mailTime                     int,
MailneteaseMailsucc                 int,
MailneteaseMailreq                  int,
MailneteaseMailresptimeall          int,
MailneteaseMailresp                 int,
MailneteaseMaildownflow             int,
MailneteaseMaildowntime             int,
MailneteaseMailFlow                 int,
MailneteaseMailTime                 int,
financialsjsjsucc                   int,
financialsjsjreq                    int,
financialsjsjresptimeall            int,
financialsjsjresp                   int,
financialsjsjdownflow               int,
financialsjsjdowntime               int,
financialsjsjFlow                   int,
financialsjsjTime                   int,
financialsjzqsucc                   int,
financialsjzqreq                    int,
financialsjzqresptimeall            int,
financialsjzqresp                   int,
financialsjzqdownflow               int,
financialsjzqdowntime               int,
financialsjzqFlow                   int,
financialsjzqTime                   int,
financialzixuangusucc               int,
financialzixuangureq                int,
financialzixuanguresptimeall        int,
financialzixuanguresp               int,
financialzixuangudownflow           int,
financialzixuangudowntime           int,
financialzixuanguFlow               int,
financialzixuanguTime               int,
Othergdqqtsucc                      int,
Othergdqqtreq                       int,
Othergdqqtresptimeall               int,
Othergdqqtresp                      int,
Othergdqqtdownflow                  int,
Othergdqqtdowntime                  int,
OthergdqqtFlow                      int,
OthergdqqtTime                      int,
Otherydzssucc                       int,
Otherydzsreq                        int,
Otherydzsresptimeall                int,
Otherydzsresp                       int,
Otherydzsdownflow                   int,
Otherydzsdowntime                   int,
OtherydzsFlow                       int,
OtherydzsTime                       int,
Othernxbstsucc                      int,
Othernxbstreq                       int,
Othernxbstresptimeall               int,
Othernxbstresp                      int,
Othernxbstdownflow                  int,
Othernxbstdowntime                  int,
OthernxbstFlow                      int,
OthernxbstTime                      int,
Othernxtsucc                        int,
Othernxtreq                         int,
Othernxtresptimeall                 int,
Othernxtresp                        int,
Othernxtdownflow                    int,
Othernxtdowntime                    int,
OthernxtFlow                        int,
OthernxtTime                        int,
Otheryjtsucc                        int,
Otheryjtreq                         int,
Otheryjtresptimeall                 int,
Otheryjtresp                        int,
Otheryjtdownflow                    int,
Otheryjtdowntime                    int,
OtheryjtFlow                        int,
OtheryjtTime                        int
)PARTITIONED BY (
  dt string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/sgw_day_http';

drop table warnningtable;
CREATE EXTERNAL TABLE warnningtable(
City  int,
Cellid   bigint,
warnningtitle    string,
warnningtime     string,
effect           string
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/warnningtable';

drop table t_xdr_event_msg;
CREATE EXTERNAL TABLE t_xdr_event_msg(
city string,
xdrid string,
procedurestarttime bigint,
ttime string,
procedureendtime bigint,
imsi string,
imei string,
tetac string,
msisdn string,
cellid bigint,
sgw string,
sp string,
apptype int,
appsubtype int,
appstatus int,
etype string,
failurecase string,
cellregion string
)PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/t_xdr_event_msg';


drop table LTECELL;
create table LTECELL(
  MCC         int,
  MNC         INT,
  MMEGROUPID  INT,
  MMEID       int,
  ENODEBID    int,
  SITENAME    STRING,
  CELLNAME    STRING,
  LOCALCELLID int,
  CELLID      int,
  TAI         INT,
  PCI         INT,
  FREQ1       INT,
  FREQ2       INT,
  BANDWIDTH1  double,
  BANDWIDTH2  double,
  FREQCOUNT   INT,
  LONGITUDE   double,
  LATITUDE    double,
  SECTORTYPE  int,
  DOORTYPE    INT,
  TILTTOTAL   DOUBLE,
  TILTM       DOUBLE,
  TILTE       DOUBLE,
  AZIMUTH     DOUBLE,
  BEAMWIDTH   DOUBLE,
  VBEAMWIDTH  DOUBLE,
  AHEIGHT     DOUBLE,
  CITY        string,
  COMPANY     string,
  REGION      string,
  ENBTYPE     string,
  ENBVERSION  string
  )ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ',';

drop table business_type_detail;
create EXTERNAL table business_type_detail(
        TTIME              string,
        city               string,
        region             string,
        CELLID             int,
        app_type           string,
        app_sub_type       string,
        uldata             bigint,
        dldata             bigint
)
PARTITIONED BY (
  dt string,
  h string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
LOCATION
  'hdfs://dtcluster/$WAREHOUSE/business_type_detail';
EOF